/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package SPARQL;

import java.util.Objects;

/**
 *
 * @author riccardo
 */
public class BlankNode implements Subj, Obje, Constant{
    private String bn;

    public BlankNode(String bn) {
        this.bn = bn;
    }

    public String getBn() {
        return bn;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 17 * hash + Objects.hashCode(this.bn);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final BlankNode other = (BlankNode) obj;
        if (!Objects.equals(this.bn, other.bn)) {
            return false;
        }
        return true;
    }

    @Override
    public Object clone(){
        return this;
    }

    @Override
    public String toString() {
        return  "_:" + bn ;
    }
    
}
